class Solution {
public:
    vector<int> twoSum(vector<int>& numbers, int target) {
        int n=numbers.size();
        int left=0,right=n-1;
        while(right>left)
        {
            if(numbers[right]+numbers[left]>target)
            right--;
            else if(numbers[right]+numbers[left]<target)
            left++;
            else return {left+1,right+1};
        }
        return {0,0};
    }
};
